package cn.wolfcode.util;

import cn.wolfcode.exception.LogicException;
import org.springframework.util.StringUtils;

/**
 * 判断工具类
 */
public class AssertUtil {

    private AssertUtil(){

    }
    public static void hasLength(String s, String msg) {
        if (!StringUtils.hasLength(s)) {
            throw new LogicException(msg);
        }
    }

    /**
     * 两次密码确认
     */
    public static void pwdEq(String a,String b,String msg){
        if(!a.equals(b)){
            throw new LogicException(msg);
        }
    }

}
